/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package vn.com.sml.SEFM.BUS;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import javax.persistence.RollbackException;
import javax.transaction.HeuristicMixedException;
import javax.transaction.HeuristicRollbackException;
import javax.transaction.SystemException;
import org.hibernate.HibernateException;
import org.hibernate.Session;
import org.hibernate.Transaction;
import vn.com.sml.SEFM.domain.Cities;
import vn.com.sml.SEFM.DAO.CitiesDAO;
import vn.com.sml.SEFM.domain.Countries;
import vn.com.sml.SEFM.util.HibernateUtil;
/**
 *
 * @author Tunp
 */
public class CitiesBUS {
    public static List<Cities> listCities() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException {
        return CitiesDAO.listCities();
    }
    
    public static List<Cities> getListCitiesByCountry(int country_id) {
        return CitiesDAO.getListCitiesByCountry(country_id);
    }
    
    public static List<Countries> listCountries() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException {
        return CitiesDAO.listCountries();
    }
    
    public static Cities getCitiesById(int id) {
        return CitiesDAO.getCitiesById(id);
    }
}
